package com.situ.mall.notification.spi.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.situ.mall.notification.spi.model.Notification;

import java.util.List;

public interface NotificationService {

    Page<Notification> findAll(Page<Notification> page, Notification notification);

    Notification findById(Integer id);

    boolean save(Notification notification);

    boolean update(Notification notification);

    int deleteByIds(List<Integer> ids);

    boolean saveIds(int[] ids);

    Page<Notification> findUserNotifications(Page<Notification> page, Integer userId);
    
    Integer getUnreadNotificationCount(Integer userId);
    
    boolean markNotificationAsRead(Integer notificationId);
    
    boolean markAllNotificationsAsRead(Integer userId);

}
